package com.resafety.rtsp2flv.service.impl;

import com.resafety.rtsp2flv.service.FFmpegManager;
import com.resafety.rtsp2flv.utils.RtspToRtmpUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class FFmpegManagerImpl implements FFmpegManager {

    @Autowired
    RedisTemplate redisTemplate;

    @Autowired
    RtspToRtmpUtils rtspToRtmpUtils;

    @Override
    public String start(String processNum, String commandUrl) {
        redisTemplate.opsForValue().set("trans"+processNum, commandUrl);
        return null;
    }

    @Override
    public boolean stop(String processNum) {
        return false;
    }

    @Override
    public int stopAll() {
        return 0;
    }
}
